<template>
    <div>
        <a href="/login">回登录</a>       
<h1>会员基本信息</h1>
<table class="table">
    <thead>
<tr>
    <td>姓名</td>
    <td>密码</td>
    <td>性别</td>
    <td>爱好</td>
    <td>地址</td>
    <td>出生日期</td>
    <td>操作</td>
</tr>
    </thead>

    <tbody>
        <tr v-for="a in data">
            <td>{{a.name}}</td>
    <td>******</td>
    <td>{{a.sex==1?"男":"女"}}</td>
    <td>{{a.aiHao}}</td>
    <td>{{a.diZhi}}</td>
    <td>{{a.chuTime}}</td>
    <td>操作</td>
        </tr>
    </tbody>
</table>
    </div>
</template>

<script setup lang="ts">
import { onMounted, ref } from 'vue';
import axios from 'axios';
onMounted(()=>{
    show()
})
const data=ref([
  {
    "id": 0,
    "name": "",
    "diZhi": "",
    "aiHao": "",
    "sex": 0,
    "chuTime": "2005-12-03T00:00:00",
    "password": ""
  }
])
const show=()=>{
    axios.get("https://localhost:7097/api/Hy/ShowHy").then(res=>{
        data.value=res.data
    })
}
</script>

<style scoped>

</style>